import type {ResponseData, ResponsePage} from "@/types/api/common";


interface CategoryChildren{
  categoryName: string;
  categoryId:number
}

export  interface GetBaseCategoryRes extends ResponseData {
  data:{
    categoryChild:CategoryChildren[];
  }
}


export interface GetListReq{
  category1Id?: number;
  category2Id?: number;
  category3Id?: number;
  categoryName?: string;
  keyword?: string;
  props?: string[];
  trademark?: string;
  order?: string;
  pageNo?: number;
  pageSize?: number;
}

interface GoodListItem {
  id: number;
  defaultImg: string;
  title: string;
  price: number;
  createTime: string | null;
  tmId: number| null;
  tmName: string;
  category1Id: number;
  category2Id: number;
  category3Id: number;
  category1Name: string;
  category2Name: string;
  category3Name: string;
  hotScore: number;
  attrs: any | null;
}

interface TrademarkList{
  tmId: number;
  tmName: string;
  logoUrl: string;
}

interface AttrsList{
  attrId: number;
  attrName: string;
  attrValueList: string[];
}

// 商品信息类型声明
interface GetListData extends ResponsePage {
  goodList:GoodListItem[];
  trademarkList:TrademarkList[];
  attrsList: AttrsList[];
}

export interface GetListRes extends ResponseData<GetListData> {
  data: GetListData
}
